package com.ljx.funchat.chat.domain.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import java.util.Date;

import lombok.*;

/**
 * <p>
 * 红包表
 * </p>
 *
 * @author LiJunXi
 * @since 2024-02-18
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("tb_redbag")
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class Redbag implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 红包ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 创建者ID
     */
    @TableField("uid")
    private Long uid;

    /**
     * 房间ID
     */
    @TableField("room_id")
    private Long roomId;

    /**
     * 消息ID
     */
    @TableField("message_id")
    private Long messageId;

    /**
     * 总金额
     */
    @TableField("money")
    private Integer money;

    /**
     * 红包个数
     */
    @TableField("number")
    private Integer number;

    /**
     * 剩余红包个数
     */
    @TableField("final_number")
    private Integer finalNumber;

    /**
     * 剩余总金额
     */
    @TableField("final_money")
    private Integer finalMoney;


    /**
     * 祝福语句
     */
    @TableField("`desc`")
    private String desc;

    /**
     * 修改时间
     */
    @TableField("create_time")
    private Date createTime;


    public Redbag(Long id) {
        this.id = id;
    }
}
